package com.cloudkinto.inteceptors;

import com.cloudkinto.session.UserSession;

import javax.servlet.ServletContext;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * @author long
 * @Description TODO
 * @Date 2025/1/17 8:59
 */
/*@WebListener
public class UserLoginListener implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent se) {

    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        //获取ServletContext对象，然后将所对应的HttpSession删除
        HttpSession session = se.getSession();
        ServletContext servletContext = session.getServletContext();
        servletContext.removeAttribute(UserSession.SESSION_ID_KEY);
    }
}*/

